home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c
- Subject: Re: Is this ok: *pointer++ = value ??
- Date: Sat, 06 Jan 1996 22:46:42 GMT
- Organization: Netcom
- Message-ID: <30eefb76.72646976@nntp.ix.netcom.com>
- References: <4cklvv$nmm@alcor.usc.edu> <4cmmcd$e3u@gryphon.phoenix.net>
- NNTP-Posting-Host: ix-dc13-13.ix.netcom.com
- X-NETCOM-Date: Sat Jan 06 2:46:25 PM PST 1996
- X-Newsreader: Forte Agent .99c/16.141
-
- brucew@phoenix.net (Bruce Wedding) wrote:
-
- |>wawda@alcor.usc.edu (Abu Wawda) wrote:
- |>
- |>> for (i=0; i<50; i++) *pointer++ = i;
- |>
- |>>My only problem is why? I mean you aren't allowed to do:
- |>
- |>> for (i=0; i<50; i++) p++ = i;
- |>
- |>Sure you can do that. You are assigning addresses to the pointer.
- It
- |>probably isn't too smart, but it is legal.
-
- In what language is it legal? Certainly not C which requires a
- modifiable lvalue as the right operand of = and defines p++ as not
- being an lvalue.
-
- Michael M Rubenstein
-